@extends('admin.layout.main')

@section('content')
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="#">首页</a>
	</li>
	<li><a href="#">系统钱包管理</a></li>
	<li class="active"><a href="/admin/confirm_currency?turn_id={{$data->id}}">确认发币 </a></li>
</ul><!-- /.breadcrumb -->

</div>
<div class="page-content">
    <div class="col-xs-12 col-sm-3 center">
        <div>
            <span class="profile-picture">
                <img id="avatar" class="editable img-responsive" alt="{{$data->user->nickname}}"
                src="{{config('alioss.host')}}{{ $data->user->headimg }}" />
            </span>

            <div class="space-4"></div>

            <div class="width-80 label label-info label-xlg arrowed-in arrowed-in-right">
                <div class="inline position-relative">
                    <a href="#" class="user-title-label dropdown-toggle" data-toggle="dropdown">
                        <i class="ace-icon fa fa-circle light-green"></i>
                        &nbsp;
                        <span class="white">{{$data->user->nickname}}</span>
                    </a>

                </div>
            </div>
        </div>

        <div class="space-6"></div>

		<div class="profile-contact-info">
			<div class="profile-contact-links align-left">
				@if(collect($data->user->user_alipay)->count() > 0)
                    <a href="#" class="btn btn-link">
                        <!-- <i class="ace-icon fa fa-plus-circle bigger-120 green"></i> -->
                        支付宝:
                        {{$data->user->user_alipay->alipay_account}}
                    </a>
                @else
                    <a href="#" class="btn btn-link">
                        <i class="ace-icon fa fa-plus-circle bigger-120 green"></i>
                        未绑定支付宝
                    </a>
				@endif
				@if(collect($data->user->user_wechat)->count() > 0)
                    <a href="#" class="btn btn-link">
                        <!-- <i class="ace-icon fa fa-globe bigger-125 blue"></i> -->
                        微信:
                        {{$data->user->user_wechat->wechat_account}}
                    </a>
                @else
                    <a href="#" class="btn btn-link">
                        <i class="ace-icon fa fa-globe bigger-125 blue"></i>
                        未绑定微信支付
                    </a>
				@endif
			</div>

		</div>

    </div>
    <div class="col-xs-12 col-sm-9">


		<div class="profile-user-info profile-user-info-striped">
			<div class="profile-info-row">
				<div class="profile-info-name"> 用户资产</div>
				<div class="profile-info-value">可用余额</div>
                <div class="profile-info-value">冻结余额</div>
			</div>

            <div class="profile-info-row">
                <div class="profile-info-name"> {{$property->currency->name_en}}</div>
                <div class="profile-info-value">{{$property->balance}}</div>
                <div class="profile-info-value">{{$property->blocked}}</div>
            </div>

		</div>

		<div class="space-12"></div>

		<div class="profile-user-info profile-user-info-striped">
            <div class="profile-info-row">
				<div class="profile-info-name"> 币种</div>

				<div class="profile-info-value">
					<span class="editable" id="username">{{$data->currency->name_en}}</span>
				</div>
			</div>

			<div class="profile-info-row">
				<div class="profile-info-name"> 订单号</div>

				<div class="profile-info-value">
					<span class="editable" id="username">{{$data->order_no}}</span>
				</div>
			</div>

			<div class="profile-info-row">
				<div class="profile-info-name"> 转出数量 </div>

				<div class="profile-info-value">
					<span class="editable" id="city">{{$data->num}}</span>
				</div>
			</div>

			<div class="profile-info-row">
				<div class="profile-info-name"> 手续费 </div>

				<div class="profile-info-value">
					<span class="editable" id="age">{{$data->proc}}</span>
				</div>
			</div>

			<div class="profile-info-row">
				<div class="profile-info-name"> 实际数量 </div>

				<div class="profile-info-value">
					<span class="editable" id="signup">{{$data->real_num}}</span>
				</div>
			</div>

			<div class="profile-info-row">
				<div class="profile-info-name"> 转出地址 </div>

				<div class="profile-info-value">
					<span class="editable" id="login">{{$data->wallet_address}}</span>
				</div>
			</div>

			<div class="profile-info-row">
				<div class="profile-info-name"> 提交时间 </div>

				<div class="profile-info-value">
					<span class="editable" id="about">{{$data->created_at}}</span>
				</div>
			</div>
		</div>

        <div class="space-6"></div>

        <form action="/admin/confirm_send_currency" method="post">
            {{csrf_field()}}
            <input type="hidden" name="turn_id" value="{{$data->id}}">

            <div class="profile-user-info profile-user-info-striped">
                <div class="profile-info-row">
                    <div class="profile-info-name"> 选择系统钱包</div>
                    <div class="profile-info-value">
                        <select name="wallet_id">
                            @foreach($wallets as $wallet)
                                 <option value="{{$wallet->id}}">{{$wallet->address}} (可用余额：{{$wallet->balance}})</option>
                             @endforeach
                        </select>
                    </div>

                </div>
            </div>

            <div class="space-6"></div>

            <div class="center">
                <button class="btn btn-info" type="submit">
                    <i class="ace-icon fa fa-check bigger-110"></i>
                    确认发币
                </button>
            </div>
        </form>

</div>

@endsection
@section('after.js')
<script type="text/javascript">

$('#mybtn').click(function(){
    $(this).attr('disabled','disabled').die('click');
    // other code
});
</script>
@endsection
